using UnityEngine;
using UnityEngine.AI;

namespace CinemaDirector
{
	[CutsceneItem("Navigation", "Set Destination")]
	public class SetDestinationEvent : CinemaActorEvent
	{
		public Vector3 target;

		public override void Trigger(GameObject actor)
		{
			NavMeshAgent component = actor.GetComponent<NavMeshAgent>();
			if (component != null)
			{
				component.SetDestination(target);
			}
		}

		public override void Reverse(GameObject actor)
		{
		}
	}
}
